package com.ethank.service.impl;

import com.ethank.common.core.domain.AjaxResult;
import com.ethank.mapper.PackageRoomMapper;
import com.ethank.service.PackageRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author gouqizi
 * @desc
 * @date 2025/4/22 11:10
 */
@Service
public class PackageRoomServiceImpl implements PackageRoomService {
    @Autowired
    PackageRoomMapper packageRoomMapper;

    @Override
    public AjaxResult getAccountBalance(String shopId) {
        Map<String, Object> balance = packageRoomMapper.getAccountBalance(shopId);
        return AjaxResult.success(balance);
    }

    @Override
    public AjaxResult getAccountBillDetail(String shopId, Integer type) {
        List<Map<String, Object>> detail = packageRoomMapper.getAccountBillDetail(shopId, type);
        return AjaxResult.success(detail);
    }
}
